using GameCreator.Runtime.Characters;
using UnityEngine;

public class CharacterJump : MonoBehaviour
{
    private Character _cc;

    // Start is called once before the first execution of Update after the MonoBehaviour is created
    void Start()
    {
        _cc = GetComponent<Character>();
    }

    // Update is called once per frame
    async void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            _cc.Jump.Do();
        }

        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            await _cc.Dash.Execute(transform.forward, 5, 9.8f, 2, 0.5f);
        }
    }
}
